class ContactModel {
  final String section;

  // 该字母下的所有联系人姓名
  final List<ContactItem> contacts;

  ContactModel({
    required this.section,
    required this.contacts,
  });

  set setContacts(contacts) => contacts = contacts;
  List<ContactItem> get getContacts => contacts;

  compareTo(ContactModel b) {
    return section.compareTo(b.section);
  }
}

class ContactItem {
  String name;
  String phone;
  bool? deleted;
  bool? imported;

  ContactItem(this.name, this.phone, {this.imported = false, this.deleted = false});

  Map<String, dynamic> toMap() {
    Map<String, dynamic> map = {};
    map["name"] = name;
    map["phone"] = phone;

    return map;
  }
}
